<link rel="stylesheet" type="text/css" href="modules/pluginModal/modal.css" />
<link rel="stylesheet" type="text/css" href="common/jquery.Jcrop.css" />
<script type="text/javascript" src="modules/pluginModal/modal.js"></script>
<style type="text/css">
.jcrop-holder #preview-pane {
  display: block;
  position: absolute;
  z-index: 2000;
  top: 0px;
  right: -250px;
  padding: 6px;
  background-color: white;
  border:#ddd solid 1px;
}
#preview-pane .preview-container {
  	width: 250px;
  	height: 170px;
  	overflow: hidden;
    position: absolute;
    top: 50%;
    margin-top: -100px;
    left: 0;
    height: 200px;
    width: 200px;
}

</style>
<div class="selfModal">
	<div class="modalHeader">
		<button class="modalClose" ms-click="closeOut()">X</button>
	</div>
	<div class="formContent">
		<input type="hidden" name="x" />
		<input type="hidden" name="y" />
		<input type="hidden" name="w" />
		<input type="hidden" name="h" />
		<input type="hidden" name="token" id="token" />
		<input type="file" name="file" onchange="previewImage(this)" accept=".png,.jpg" class="upload" id="btn_file" style="display: none;" />
		<div style="background:#F3F2F7;display:inline-block;float:left;margin-left: 20px;" id="tuchushi">
    		<img id="cropbox" ms-src="changImg" style="display: block;width:100%;height:100%;" />
			<input type="button" class="upload" value="浏览" onclick="F_Open_dialog()" />
			<label class="tishiwenzi" id="upload1">只支持JPG、PNG格式，大小不超过5M</label>
			<div class="imginput"><label class="jiahao">+</label><label class="inputlabel"><span id="upload2">选择图片</span></label></div>
		</div>
    	<div id="preview-pane">
        	<div class="preview-container">
            	<img ms-src="changImg" id="previewid" class="jcrop-preview" alt="Preview" style="width:200px;height:200px;" />
        	</div>
    	</div>
    	<div class="new_img_but">
    		<button id="btn_sureselect" onclick="UpladFile()">
        		确定裁剪
    		</button>
    		<button id="upload3" ms-click="closeOut()">取消</button>
		</div>
    </div>
</div>
<script type="text/javascript">
function F_Open_dialog() {
    document.getElementById("btn_file").click();
}
</script>